<!--
 * @Author: your name
 * @Date: 2022-01-24 02:20:31
 * @LastEditTime: 2022-01-28 01:11:46
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \json-serveg:\桌面2\VueStudy\vue-ego\vue-ego\src\components\MyPagination.vue
-->
<template>
  <div class="page">
      <el-pagination
        background
        layout="total,prev, pager, next,jumper"
        :total=total
        :pageSize =pageSize
        :current-page="currentPage"
        @current-change="change">
        </el-pagination>
  </div>
</template>

<script>
export default {
    props:{
        total:{
            type:Number,
            default:100
        },
        pageSize:{
            type:Number,
            default:10
        },
        currentPage:{//显示第几页
            type:Number,
            default:1
        }
    },
    methods: {
        change(page){
            this.$emit('changePage',page)
        }
    },
}
</script>

<style lang="less" scoped>
.page{
    text-align: center;
    margin: 20px;
}
</style>
